Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dependency array to useCreateSavedSearch hook #21338

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

maxiadlovskii
Copy link
Contributor

@maxiadlovskii maxiadlovskii commented Jan 13, 2025

Description

Issue #20465 happens because the useMemo inside the useCreateSavedSearch hook doesn't have dependencies of streamId in the dependencies array. That was done to not recreate the view when on the search page some parameters change (e.g. streams from query params). In the case of the streams search page we have to recreate the view when the stream id from params changes. To solve the issue we can add deps array to useCreateSavedSearch hook which we pass to useMemo

Motivation and Context

fix: #20465

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (non-breaking change)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.

@maxiadlovskii maxiadlovskii changed the title Fix/issue 20465 Add dependency array to useCreateSavedSearch hook Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Message table link to stream not working when searching in a stream
1 participant